package com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.check;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseService;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.requestutil.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Author: YangYu
 * @ClassName: FireCheckService
 * @Date: Created in 13:48 2024/3/19
 * @Description: 消防巡检巡查
 */
@Service
@Slf4j
public class FireCheckService extends BaseService {


    /**
     * @Author YangYu
     * @Description 消防检查项列表
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity getCheckItemList(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","getCheckItemList","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 检查项-详情列表
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity getCheckItemDetailsList(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","getCheckItemDetailsList","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 检查任务新增
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity addCheckTask(JSONObject jsonParam) {
        return restJava(jsonParam,"checkJava","addCheckTask","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 检查任务列表
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity getCheckTaskList(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","getCheckTaskList","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 更新检查任务状态
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity updateCheckState(JSONObject jsonParam) {
        return restJava(jsonParam,"checkJava","updateCheckState","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 检查内容新增、编辑
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity addOrUpdateCheckContent(JSONObject jsonParam) {
        return restJava(jsonParam,"checkJava","addOrUpdateCheckContent","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 更新整改信息
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity updateRectificationInfo(JSONObject jsonParam) {
        return restJava(jsonParam,"checkJava","updateRectificationInfo","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 检查内容详情
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity checkContentDetails(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","checkContentDetails","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 更新整改期限
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity updateContentTime(JSONObject jsonParam) {
        return restJava(jsonParam,"checkJava","updateContentTime","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 整改内容列表
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity checkContentList(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","checkContentList","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 告知内容内容列表
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity checkInformContentList(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","checkInformContentList","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 查看是否存在未整改的状态
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity checkContentState(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","checkContentState","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 检查文件保存
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity checkFileAdd(JSONObject jsonParam) {
        return restJava(jsonParam,"checkJava","checkFileAdd","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 检查文件列表
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity checkFileList(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","checkFileList","fireCheck");
    }

    /**
     * 保存巡查通知文件
     * @param jsonObject
     * @return
     * @throws Exception
     */
    public RespEntity saveInspectioNnoticeFile(JSONObject jsonObject) {
        jsonObject = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonObject,"checkJava","saveInspectioNnoticeFile","fireCheck");
    }

    /**
     * 保存复查单
     * @param jsonObject
     * @return
     * @throws Exception
     */
    public RespEntity reCheckBill(JSONObject jsonObject) {
        jsonObject = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonObject,"checkJava","reCheckBill","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 统计隐患
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity hazardStatistics(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","hazardStatistics","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 隐患排名
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity hazardRanking(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","hazardRanking","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 检查隐患详情数据
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity checkHazardDetails(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","checkHazardDetails","fireCheck");
    }

    /**
     * @Author YangYu
     * @Description 统计生成的报告数
     * @Date Created in 13:54 2024/3/19
     * @Param [jsonParam]
     */

    public RespEntity checkFileCount(JSONObject jsonParam) {
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"checkJava","checkFileCount","fireCheck");
    }

}
